<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--导入JSTL标签库--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <title>信院管理员</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

    <style>
        /* div[class|=col]{
            border: 2px solid #2E9AFE;
        } */
        body{
            background-image: url(img/a3.png);
        }
    </style>
</head>
<body >
<div class="container" style="position: relative;top: 70px;">
    <!-- 在row里面，默认会把一行分 为12块 -->
    <div class="row">
        <div class="col-lg-12">
            <h2 align="center">管理员系统</h2>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-8">
            <ul class="nav nav-tabs">
                <li><a href="/Admin-min.jsp">租房管理</a></li>
                <li><a href="/Admin-User.jsp">租客管理</a></li>
                <li><a href="/Admin-record.jsp">记录管理</a></li>
                <li><a href="/Add-min.jsp">添加房间</a></li>
                <li style="color: red"><h4>${AdminHint}</h4></li>
            </ul>
        </div>
        <div class="col-lg-4">
            <ul class="nav nav-tabs">
                <form action="/QueryUser.do" method="post">
                    <input type="text" value="根据账号查询" name="username" style="position: relative;top:10px;" />
                    <input type="submit" value="查询" style="position: relative;top:10px;">
                </form>
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-2"><h4>用户名</h4></div>
        <div class="col-lg-2"><h4>编号</h4></div>
        <div class="col-lg-2"><h4>等级</h4></div>
        <div class="col-lg-2"><h4>账号</h4></div>
        <div class="col-lg-2"><h4>密码</h4></div>
    </div>

    <c:forEach items="${queryuser}" var="result">
        <div class="row">
            <div class="col-lg-2">${result.pname}</div>
            <div class="col-lg-2">${result.pid}</div>
            <div class="col-lg-2">
                <c:if test="${result.rank==0}">
                    普通用户
                </c:if>
                <c:if test="${result.rank==1}">
                    会员
                </c:if>
                <c:if test="${result.rank==2}">
                    贵宾
                </c:if>
            </div>
            <div class="col-lg-2">${result.username}</div>
            <div class="col-lg-2">${result.password}</div>
            <div class="col-lg-2"><a href="/GetUser.do?pid=${result.pid}">修改</a>/<a href="/DeleteUser.do?pid=${result.pid}">删除</a></div>
        </div>
    </c:forEach>

</div>
</body>
</html>

